import {
  Controller,
  Get,
  Post,
  Body,
  Patch,
  Param,
  Delete,
} from '@nestjs/common';
import { AgentService } from './agent.service';
import { ResponseUtil } from '../common/utils/response.util';

@Controller('agent')
export class AgentController {
  constructor(private readonly agentService: AgentService) {}
  //分页查询获取 agent 节点 列表
  public agentlist: any = {
    pages: '1',
    total: '62',
    list: [
      // 原有数据保持不变
      {
        id: '1950832507307249665',
        name: null,
        ip: '127.0.0.1',
        port: 55652,
        mid: 'node001',
        starType: 'lowStar',
        remarks: null,
        status: 1,
        createTime: '2025-07-31 16:14:49',
        updateTime: '2025-09-26 03:10:07',
        heartbeat: '2025-09-25 21:14:45',
        clusterName: null,
        parentMid: 'node002',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249666',
        name: 'TestName',
        ip: '192.168.5.70',
        port: 56495,
        mid: 'node002',
        starType: 'lowStar',
        remarks: null,
        status: 0,
        createTime: '2025-07-31 16:14:49',
        updateTime: '2025-09-26 03:09:49',
        heartbeat: '2025-09-10 14:46:09',
        clusterName: 'karmada集群',
        parentMid: null,
        nodeType: '0',
        clusterIp: '192.168.5.70',
        clusterPort: 99,
        clusterStatus: '1',
        clusterCreateType: '0',
        clusterCount: '0',
      },
      // 新增集群主节点
      {
        id: '1950832507307249667',
        name: '生产集群主节点',
        ip: '10.0.1.10',
        port: 8080,
        mid: 'cluster-prod-001',
        starType: 'midStar',
        remarks: '生产环境主集群',
        status: 1,
        createTime: '2025-08-01 10:00:00',
        updateTime: '2025-09-26 08:00:00',
        heartbeat: '2025-09-26 08:15:00',
        clusterName: '生产集群',
        parentMid: null,
        nodeType: '0',
        clusterIp: '10.0.1.10',
        clusterPort: 8080,
        clusterStatus: '1',
        clusterCreateType: '0',
        clusterCount: '5',
      },
      {
        id: '1950832507307249668',
        name: '测试集群主节点',
        ip: '10.0.2.10',
        port: 8081,
        mid: 'cluster-test-001',
        starType: 'midStar',
        remarks: '测试环境主集群',
        status: 1,
        createTime: '2025-08-02 10:00:00',
        updateTime: '2025-09-26 08:00:00',
        heartbeat: '2025-09-26 08:16:00',
        clusterName: '测试集群',
        parentMid: null,
        nodeType: '0',
        clusterIp: '10.0.2.10',
        clusterPort: 8081,
        clusterStatus: '1',
        clusterCreateType: '0',
        clusterCount: '5',
      },
      {
        id: '1950832507307249669',
        name: '开发集群主节点',
        ip: '10.0.3.10',
        port: 8082,
        mid: 'cluster-dev-001',
        starType: 'lowStar',
        remarks: '开发环境主集群',
        status: 1,
        createTime: '2025-08-03 10:00:00',
        updateTime: '2025-09-26 08:00:00',
        heartbeat: '2025-09-26 08:17:00',
        clusterName: '开发集群',
        parentMid: null,
        nodeType: '0',
        clusterIp: '10.0.3.10',
        clusterPort: 8082,
        clusterStatus: '1',
        clusterCreateType: '0',
        clusterCount: '5',
      },
      {
        id: '1950832507307249670',
        name: '预发布集群主节点',
        ip: '10.0.4.10',
        port: 8083,
        mid: 'cluster-pre-001',
        starType: 'midStar',
        remarks: '预发布环境主集群',
        status: 0,
        createTime: '2025-08-04 10:00:00',
        updateTime: '2025-09-26 08:00:00',
        heartbeat: '2025-09-24 15:30:00',
        clusterName: '预发布集群',
        parentMid: null,
        nodeType: '0',
        clusterIp: '10.0.4.10',
        clusterPort: 8083,
        clusterStatus: '0',
        clusterCreateType: '0',
        clusterCount: '5',
      },
      {
        id: '1950832507307249671',
        name: '华东区集群主节点',
        ip: '172.16.1.10',
        port: 8084,
        mid: 'cluster-east-001',
        starType: 'midStar',
        remarks: '华东区域主集群',
        status: 1,
        createTime: '2025-08-05 10:00:00',
        updateTime: '2025-09-26 08:00:00',
        heartbeat: '2025-09-26 08:18:00',
        clusterName: '华东区集群',
        parentMid: null,
        nodeType: '0',
        clusterIp: '172.16.1.10',
        clusterPort: 8084,
        clusterStatus: '1',
        clusterCreateType: '0',
        clusterCount: '5',
      },
      {
        id: '1950832507307249672',
        name: '华南区集群主节点',
        ip: '172.16.2.10',
        port: 8085,
        mid: 'cluster-south-001',
        starType: 'lowStar',
        remarks: '华南区域主集群',
        status: 1,
        createTime: '2025-08-06 10:00:00',
        updateTime: '2025-09-26 08:00:00',
        heartbeat: '2025-09-26 08:19:00',
        clusterName: '华南区集群',
        parentMid: null,
        nodeType: '0',
        clusterIp: '172.16.2.10',
        clusterPort: 8085,
        clusterStatus: '1',
        clusterCreateType: '0',
        clusterCount: '5',
      },
      {
        id: '1950832507307249673',
        name: '华北区集群主节点',
        ip: '172.16.3.10',
        port: 8086,
        mid: 'cluster-north-001',
        starType: 'midStar',
        remarks: '华北区域主集群',
        status: 0,
        createTime: '2025-08-07 10:00:00',
        updateTime: '2025-09-26 08:00:00',
        heartbeat: '2025-09-25 10:30:00',
        clusterName: '华北区集群',
        parentMid: null,
        nodeType: '0',
        clusterIp: '172.16.3.10',
        clusterPort: 8086,
        clusterStatus: '0',
        clusterCreateType: '0',
        clusterCount: '5',
      },
      {
        id: '1950832507307249674',
        name: '边缘计算集群主节点',
        ip: '192.168.100.10',
        port: 8087,
        mid: 'cluster-edge-001',
        starType: 'lowStar',
        remarks: '边缘计算主集群',
        status: 1,
        createTime: '2025-08-08 10:00:00',
        updateTime: '2025-09-26 08:00:00',
        heartbeat: '2025-09-26 08:20:00',
        clusterName: '边缘计算集群',
        parentMid: null,
        nodeType: '0',
        clusterIp: '192.168.100.10',
        clusterPort: 8087,
        clusterStatus: '1',
        clusterCreateType: '0',
        clusterCount: '5',
      },
      {
        id: '1950832507307249675',
        name: '容灾备份集群主节点',
        ip: '192.168.200.10',
        port: 8088,
        mid: 'cluster-backup-001',
        starType: 'midStar',
        remarks: '容灾备份主集群',
        status: 1,
        createTime: '2025-08-09 10:00:00',
        updateTime: '2025-09-26 08:00:00',
        heartbeat: '2025-09-26 08:21:00',
        clusterName: '容灾备份集群',
        parentMid: null,
        nodeType: '0',
        clusterIp: '192.168.200.10',
        clusterPort: 8088,
        clusterStatus: '1',
        clusterCreateType: '0',
        clusterCount: '5',
      },
      {
        id: '1950832507307249676',
        name: 'AI训练集群主节点',
        ip: '192.168.300.10',
        port: 8089,
        mid: 'cluster-ai-001',
        starType: 'midStar',
        remarks: 'AI模型训练主集群',
        status: 1,
        createTime: '2025-08-10 10:00:00',
        updateTime: '2025-09-26 08:00:00',
        heartbeat: '2025-09-26 08:22:00',
        clusterName: 'AI训练集群',
        parentMid: null,
        nodeType: '0',
        clusterIp: '192.168.300.10',
        clusterPort: 8089,
        clusterStatus: '1',
        clusterCreateType: '0',
        clusterCount: '5',
      },
      // 生产集群子节点
      {
        id: '1950832507307249677',
        name: '生产节点1',
        ip: '10.0.1.11',
        port: 55001,
        mid: 'node-prod-001',
        starType: 'lowStar',
        remarks: '生产环境工作节点1',
        status: 1,
        createTime: '2025-08-01 10:30:00',
        updateTime: '2025-09-26 08:01:00',
        heartbeat: '2025-09-26 08:15:30',
        clusterName: null,
        parentMid: 'cluster-prod-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249678',
        name: '生产节点2',
        ip: '10.0.1.12',
        port: 55002,
        mid: 'node-prod-002',
        starType: 'midStar',
        remarks: '生产环境工作节点2',
        status: 1,
        createTime: '2025-08-01 10:31:00',
        updateTime: '2025-09-26 08:01:00',
        heartbeat: '2025-09-26 08:15:31',
        clusterName: null,
        parentMid: 'cluster-prod-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249679',
        name: '生产节点3',
        ip: '10.0.1.13',
        port: 55003,
        mid: 'node-prod-003',
        starType: 'lowStar',
        remarks: '生产环境工作节点3',
        status: 0,
        createTime: '2025-08-01 10:32:00',
        updateTime: '2025-09-26 08:01:00',
        heartbeat: '2025-09-25 20:00:00',
        clusterName: null,
        parentMid: 'cluster-prod-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249680',
        name: '生产节点4',
        ip: '10.0.1.14',
        port: 55004,
        mid: 'node-prod-004',
        starType: 'midStar',
        remarks: '生产环境工作节点4',
        status: 1,
        createTime: '2025-08-01 10:33:00',
        updateTime: '2025-09-26 08:01:00',
        heartbeat: '2025-09-26 08:15:32',
        clusterName: null,
        parentMid: 'cluster-prod-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249681',
        name: '生产节点5',
        ip: '10.0.1.15',
        port: 55005,
        mid: 'node-prod-005',
        starType: 'lowStar',
        remarks: '生产环境工作节点5',
        status: 1,
        createTime: '2025-08-01 10:34:00',
        updateTime: '2025-09-26 08:01:00',
        heartbeat: '2025-09-26 08:15:33',
        clusterName: null,
        parentMid: 'cluster-prod-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      // 测试集群子节点
      {
        id: '1950832507307249682',
        name: '测试节点1',
        ip: '10.0.2.11',
        port: 55006,
        mid: 'node-test-001',
        starType: 'midStar',
        remarks: '测试环境工作节点1',
        status: 1,
        createTime: '2025-08-02 10:30:00',
        updateTime: '2025-09-26 08:02:00',
        heartbeat: '2025-09-26 08:16:30',
        clusterName: null,
        parentMid: 'cluster-test-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249683',
        name: '测试节点2',
        ip: '10.0.2.12',
        port: 55007,
        mid: 'node-test-002',
        starType: 'lowStar',
        remarks: '测试环境工作节点2',
        status: 1,
        createTime: '2025-08-02 10:31:00',
        updateTime: '2025-09-26 08:02:00',
        heartbeat: '2025-09-26 08:16:31',
        clusterName: null,
        parentMid: 'cluster-test-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249684',
        name: '测试节点3',
        ip: '10.0.2.13',
        port: 55008,
        mid: 'node-test-003',
        starType: 'midStar',
        remarks: '测试环境工作节点3',
        status: 0,
        createTime: '2025-08-02 10:32:00',
        updateTime: '2025-09-26 08:02:00',
        heartbeat: '2025-09-24 16:00:00',
        clusterName: null,
        parentMid: 'cluster-test-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249685',
        name: '测试节点4',
        ip: '10.0.2.14',
        port: 55009,
        mid: 'node-test-004',
        starType: 'lowStar',
        remarks: '测试环境工作节点4',
        status: 1,
        createTime: '2025-08-02 10:33:00',
        updateTime: '2025-09-26 08:02:00',
        heartbeat: '2025-09-26 08:16:32',
        clusterName: null,
        parentMid: 'cluster-test-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249686',
        name: '测试节点5',
        ip: '10.0.2.15',
        port: 55010,
        mid: 'node-test-005',
        starType: 'midStar',
        remarks: '测试环境工作节点5',
        status: 1,
        createTime: '2025-08-02 10:34:00',
        updateTime: '2025-09-26 08:02:00',
        heartbeat: '2025-09-26 08:16:33',
        clusterName: null,
        parentMid: 'cluster-test-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      // 开发集群子节点
      {
        id: '1950832507307249687',
        name: '开发节点1',
        ip: '10.0.3.11',
        port: 55011,
        mid: 'node-dev-001',
        starType: 'lowStar',
        remarks: '开发环境工作节点1',
        status: 1,
        createTime: '2025-08-03 10:30:00',
        updateTime: '2025-09-26 08:03:00',
        heartbeat: '2025-09-26 08:17:30',
        clusterName: null,
        parentMid: 'cluster-dev-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249688',
        name: '开发节点2',
        ip: '10.0.3.12',
        port: 55012,
        mid: 'node-dev-002',
        starType: 'midStar',
        remarks: '开发环境工作节点2',
        status: 1,
        createTime: '2025-08-03 10:31:00',
        updateTime: '2025-09-26 08:03:00',
        heartbeat: '2025-09-26 08:17:31',
        clusterName: null,
        parentMid: 'cluster-dev-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249689',
        name: '开发节点3',
        ip: '10.0.3.13',
        port: 55013,
        mid: 'node-dev-003',
        starType: 'lowStar',
        remarks: '开发环境工作节点3',
        status: 0,
        createTime: '2025-08-03 10:32:00',
        updateTime: '2025-09-26 08:03:00',
        heartbeat: '2025-09-25 14:00:00',
        clusterName: null,
        parentMid: 'cluster-dev-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249690',
        name: '开发节点4',
        ip: '10.0.3.14',
        port: 55014,
        mid: 'node-dev-004',
        starType: 'midStar',
        remarks: '开发环境工作节点4',
        status: 1,
        createTime: '2025-08-03 10:33:00',
        updateTime: '2025-09-26 08:03:00',
        heartbeat: '2025-09-26 08:17:32',
        clusterName: null,
        parentMid: 'cluster-dev-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249691',
        name: '开发节点5',
        ip: '10.0.3.15',
        port: 55015,
        mid: 'node-dev-005',
        starType: 'lowStar',
        remarks: '开发环境工作节点5',
        status: 1,
        createTime: '2025-08-03 10:34:00',
        updateTime: '2025-09-26 08:03:00',
        heartbeat: '2025-09-26 08:17:33',
        clusterName: null,
        parentMid: 'cluster-dev-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      // 预发布集群子节点
      {
        id: '1950832507307249692',
        name: '预发布节点1',
        ip: '10.0.4.11',
        port: 55016,
        mid: 'node-pre-001',
        starType: 'midStar',
        remarks: '预发布环境工作节点1',
        status: 0,
        createTime: '2025-08-04 10:30:00',
        updateTime: '2025-09-26 08:04:00',
        heartbeat: '2025-09-24 15:30:00',
        clusterName: null,
        parentMid: 'cluster-pre-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249693',
        name: '预发布节点2',
        ip: '10.0.4.12',
        port: 55017,
        mid: 'node-pre-002',
        starType: 'lowStar',
        remarks: '预发布环境工作节点2',
        status: 0,
        createTime: '2025-08-04 10:31:00',
        updateTime: '2025-09-26 08:04:00',
        heartbeat: '2025-09-24 15:31:00',
        clusterName: null,
        parentMid: 'cluster-pre-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249694',
        name: '预发布节点3',
        ip: '10.0.4.13',
        port: 55018,
        mid: 'node-pre-003',
        starType: 'midStar',
        remarks: '预发布环境工作节点3',
        status: 1,
        createTime: '2025-08-04 10:32:00',
        updateTime: '2025-09-26 08:04:00',
        heartbeat: '2025-09-26 08:18:30',
        clusterName: null,
        parentMid: 'cluster-pre-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249695',
        name: '预发布节点4',
        ip: '10.0.4.14',
        port: 55019,
        mid: 'node-pre-004',
        starType: 'lowStar',
        remarks: '预发布环境工作节点4',
        status: 0,
        createTime: '2025-08-04 10:33:00',
        updateTime: '2025-09-26 08:04:00',
        heartbeat: '2025-09-24 15:32:00',
        clusterName: null,
        parentMid: 'cluster-pre-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249696',
        name: '预发布节点5',
        ip: '10.0.4.15',
        port: 55020,
        mid: 'node-pre-005',
        starType: 'midStar',
        remarks: '预发布环境工作节点5',
        status: 0,
        createTime: '2025-08-04 10:34:00',
        updateTime: '2025-09-26 08:04:00',
        heartbeat: '2025-09-24 15:33:00',
        clusterName: null,
        parentMid: 'cluster-pre-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      // 华东区集群子节点
      {
        id: '1950832507307249697',
        name: '华东节点1',
        ip: '172.16.1.11',
        port: 55021,
        mid: 'node-east-001',
        starType: 'lowStar',
        remarks: '华东区域工作节点1',
        status: 1,
        createTime: '2025-08-05 10:30:00',
        updateTime: '2025-09-26 08:05:00',
        heartbeat: '2025-09-26 08:18:30',
        clusterName: null,
        parentMid: 'cluster-east-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249698',
        name: '华东节点2',
        ip: '172.16.1.12',
        port: 55022,
        mid: 'node-east-002',
        starType: 'midStar',
        remarks: '华东区域工作节点2',
        status: 1,
        createTime: '2025-08-05 10:31:00',
        updateTime: '2025-09-26 08:05:00',
        heartbeat: '2025-09-26 08:18:31',
        clusterName: null,
        parentMid: 'cluster-east-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249699',
        name: '华东节点3',
        ip: '172.16.1.13',
        port: 55023,
        mid: 'node-east-003',
        starType: 'lowStar',
        remarks: '华东区域工作节点3',
        status: 1,
        createTime: '2025-08-05 10:32:00',
        updateTime: '2025-09-26 08:05:00',
        heartbeat: '2025-09-26 08:18:32',
        clusterName: null,
        parentMid: 'cluster-east-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249700',
        name: '华东节点4',
        ip: '172.16.1.14',
        port: 55024,
        mid: 'node-east-004',
        starType: 'midStar',
        remarks: '华东区域工作节点4',
        status: 0,
        createTime: '2025-08-05 10:33:00',
        updateTime: '2025-09-26 08:05:00',
        heartbeat: '2025-09-25 12:00:00',
        clusterName: null,
        parentMid: 'cluster-east-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249701',
        name: '华东节点5',
        ip: '172.16.1.15',
        port: 55025,
        mid: 'node-east-005',
        starType: 'lowStar',
        remarks: '华东区域工作节点5',
        status: 1,
        createTime: '2025-08-05 10:34:00',
        updateTime: '2025-09-26 08:05:00',
        heartbeat: '2025-09-26 08:18:33',
        clusterName: null,
        parentMid: 'cluster-east-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      // 华南区集群子节点
      {
        id: '1950832507307249702',
        name: '华南节点1',
        ip: '172.16.2.11',
        port: 55026,
        mid: 'node-south-001',
        starType: 'midStar',
        remarks: '华南区域工作节点1',
        status: 1,
        createTime: '2025-08-06 10:30:00',
        updateTime: '2025-09-26 08:06:00',
        heartbeat: '2025-09-26 08:19:30',
        clusterName: null,
        parentMid: 'cluster-south-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249703',
        name: '华南节点2',
        ip: '172.16.2.12',
        port: 55027,
        mid: 'node-south-002',
        starType: 'lowStar',
        remarks: '华南区域工作节点2',
        status: 1,
        createTime: '2025-08-06 10:31:00',
        updateTime: '2025-09-26 08:06:00',
        heartbeat: '2025-09-26 08:19:31',
        clusterName: null,
        parentMid: 'cluster-south-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249704',
        name: '华南节点3',
        ip: '172.16.2.13',
        port: 55028,
        mid: 'node-south-003',
        starType: 'midStar',
        remarks: '华南区域工作节点3',
        status: 0,
        createTime: '2025-08-06 10:32:00',
        updateTime: '2025-09-26 08:06:00',
        heartbeat: '2025-09-24 18:00:00',
        clusterName: null,
        parentMid: 'cluster-south-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249705',
        name: '华南节点4',
        ip: '172.16.2.14',
        port: 55029,
        mid: 'node-south-004',
        starType: 'lowStar',
        remarks: '华南区域工作节点4',
        status: 1,
        createTime: '2025-08-06 10:33:00',
        updateTime: '2025-09-26 08:06:00',
        heartbeat: '2025-09-26 08:19:32',
        clusterName: null,
        parentMid: 'cluster-south-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249706',
        name: '华南节点5',
        ip: '172.16.2.15',
        port: 55030,
        mid: 'node-south-005',
        starType: 'midStar',
        remarks: '华南区域工作节点5',
        status: 1,
        createTime: '2025-08-06 10:34:00',
        updateTime: '2025-09-26 08:06:00',
        heartbeat: '2025-09-26 08:19:33',
        clusterName: null,
        parentMid: 'cluster-south-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      // 华北区集群子节点
      {
        id: '1950832507307249707',
        name: '华北节点1',
        ip: '172.16.3.11',
        port: 55031,
        mid: 'node-north-001',
        starType: 'lowStar',
        remarks: '华北区域工作节点1',
        status: 0,
        createTime: '2025-08-07 10:30:00',
        updateTime: '2025-09-26 08:07:00',
        heartbeat: '2025-09-25 10:30:00',
        clusterName: null,
        parentMid: 'cluster-north-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249708',
        name: '华北节点2',
        ip: '172.16.3.12',
        port: 55032,
        mid: 'node-north-002',
        starType: 'midStar',
        remarks: '华北区域工作节点2',
        status: 0,
        createTime: '2025-08-07 10:31:00',
        updateTime: '2025-09-26 08:07:00',
        heartbeat: '2025-09-25 10:31:00',
        clusterName: null,
        parentMid: 'cluster-north-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249709',
        name: '华北节点3',
        ip: '172.16.3.13',
        port: 55033,
        mid: 'node-north-003',
        starType: 'lowStar',
        remarks: '华北区域工作节点3',
        status: 1,
        createTime: '2025-08-07 10:32:00',
        updateTime: '2025-09-26 08:07:00',
        heartbeat: '2025-09-26 08:20:30',
        clusterName: null,
        parentMid: 'cluster-north-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249710',
        name: '华北节点4',
        ip: '172.16.3.14',
        port: 55034,
        mid: 'node-north-004',
        starType: 'midStar',
        remarks: '华北区域工作节点4',
        status: 0,
        createTime: '2025-08-07 10:33:00',
        updateTime: '2025-09-26 08:07:00',
        heartbeat: '2025-09-25 10:32:00',
        clusterName: null,
        parentMid: 'cluster-north-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249711',
        name: '华北节点5',
        ip: '172.16.3.15',
        port: 55035,
        mid: 'node-north-005',
        starType: 'lowStar',
        remarks: '华北区域工作节点5',
        status: 0,
        createTime: '2025-08-07 10:34:00',
        updateTime: '2025-09-26 08:07:00',
        heartbeat: '2025-09-25 10:33:00',
        clusterName: null,
        parentMid: 'cluster-north-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      // 边缘计算集群子节点
      {
        id: '1950832507307249712',
        name: '边缘节点1',
        ip: '192.168.100.11',
        port: 55036,
        mid: 'node-edge-001',
        starType: 'midStar',
        remarks: '边缘计算工作节点1',
        status: 1,
        createTime: '2025-08-08 10:30:00',
        updateTime: '2025-09-26 08:08:00',
        heartbeat: '2025-09-26 08:20:30',
        clusterName: null,
        parentMid: 'cluster-edge-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249713',
        name: '边缘节点2',
        ip: '192.168.100.12',
        port: 55037,
        mid: 'node-edge-002',
        starType: 'lowStar',
        remarks: '边缘计算工作节点2',
        status: 1,
        createTime: '2025-08-08 10:31:00',
        updateTime: '2025-09-26 08:08:00',
        heartbeat: '2025-09-26 08:20:31',
        clusterName: null,
        parentMid: 'cluster-edge-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249714',
        name: '边缘节点3',
        ip: '192.168.100.13',
        port: 55038,
        mid: 'node-edge-003',
        starType: 'midStar',
        remarks: '边缘计算工作节点3',
        status: 0,
        createTime: '2025-08-08 10:32:00',
        updateTime: '2025-09-26 08:08:00',
        heartbeat: '2025-09-25 16:00:00',
        clusterName: null,
        parentMid: 'cluster-edge-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249715',
        name: '边缘节点4',
        ip: '192.168.100.14',
        port: 55039,
        mid: 'node-edge-004',
        starType: 'lowStar',
        remarks: '边缘计算工作节点4',
        status: 1,
        createTime: '2025-08-08 10:33:00',
        updateTime: '2025-09-26 08:08:00',
        heartbeat: '2025-09-26 08:20:32',
        clusterName: null,
        parentMid: 'cluster-edge-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249716',
        name: '边缘节点5',
        ip: '192.168.100.15',
        port: 55040,
        mid: 'node-edge-005',
        starType: 'midStar',
        remarks: '边缘计算工作节点5',
        status: 1,
        createTime: '2025-08-08 10:34:00',
        updateTime: '2025-09-26 08:08:00',
        heartbeat: '2025-09-26 08:20:33',
        clusterName: null,
        parentMid: 'cluster-edge-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      // 容灾备份集群子节点
      {
        id: '1950832507307249717',
        name: '备份节点1',
        ip: '192.168.200.11',
        port: 55041,
        mid: 'node-backup-001',
        starType: 'lowStar',
        remarks: '容灾备份工作节点1',
        status: 1,
        createTime: '2025-08-09 10:30:00',
        updateTime: '2025-09-26 08:09:00',
        heartbeat: '2025-09-26 08:21:30',
        clusterName: null,
        parentMid: 'cluster-backup-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249718',
        name: '备份节点2',
        ip: '192.168.200.12',
        port: 55042,
        mid: 'node-backup-002',
        starType: 'midStar',
        remarks: '容灾备份工作节点2',
        status: 1,
        createTime: '2025-08-09 10:31:00',
        updateTime: '2025-09-26 08:09:00',
        heartbeat: '2025-09-26 08:21:31',
        clusterName: null,
        parentMid: 'cluster-backup-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249719',
        name: '备份节点3',
        ip: '192.168.200.13',
        port: 55043,
        mid: 'node-backup-003',
        starType: 'lowStar',
        remarks: '容灾备份工作节点3',
        status: 1,
        createTime: '2025-08-09 10:32:00',
        updateTime: '2025-09-26 08:09:00',
        heartbeat: '2025-09-26 08:21:32',
        clusterName: null,
        parentMid: 'cluster-backup-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249720',
        name: '备份节点4',
        ip: '192.168.200.14',
        port: 55044,
        mid: 'node-backup-004',
        starType: 'midStar',
        remarks: '容灾备份工作节点4',
        status: 0,
        createTime: '2025-08-09 10:33:00',
        updateTime: '2025-09-26 08:09:00',
        heartbeat: '2025-09-25 20:00:00',
        clusterName: null,
        parentMid: 'cluster-backup-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249721',
        name: '备份节点5',
        ip: '192.168.200.15',
        port: 55045,
        mid: 'node-backup-005',
        starType: 'lowStar',
        remarks: '容灾备份工作节点5',
        status: 1,
        createTime: '2025-08-09 10:34:00',
        updateTime: '2025-09-26 08:09:00',
        heartbeat: '2025-09-26 08:21:33',
        clusterName: null,
        parentMid: 'cluster-backup-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      // AI训练集群子节点
      {
        id: '1950832507307249722',
        name: 'AI训练节点1',
        ip: '192.168.300.11',
        port: 55046,
        mid: 'node-ai-001',
        starType: 'midStar',
        remarks: 'AI模型训练工作节点1',
        status: 1,
        createTime: '2025-08-10 10:30:00',
        updateTime: '2025-09-26 08:10:00',
        heartbeat: '2025-09-26 08:22:30',
        clusterName: null,
        parentMid: 'cluster-ai-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249723',
        name: 'AI训练节点2',
        ip: '192.168.300.12',
        port: 55047,
        mid: 'node-ai-002',
        starType: 'lowStar',
        remarks: 'AI模型训练工作节点2',
        status: 1,
        createTime: '2025-08-10 10:31:00',
        updateTime: '2025-09-26 08:10:00',
        heartbeat: '2025-09-26 08:22:31',
        clusterName: null,
        parentMid: 'cluster-ai-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249724',
        name: 'AI训练节点3',
        ip: '192.168.300.13',
        port: 55048,
        mid: 'node-ai-003',
        starType: 'midStar',
        remarks: 'AI模型训练工作节点3',
        status: 1,
        createTime: '2025-08-10 10:32:00',
        updateTime: '2025-09-26 08:10:00',
        heartbeat: '2025-09-26 08:22:32',
        clusterName: null,
        parentMid: 'cluster-ai-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249725',
        name: 'AI训练节点4',
        ip: '192.168.300.14',
        port: 55049,
        mid: 'node-ai-004',
        starType: 'lowStar',
        remarks: 'AI模型训练工作节点4',
        status: 0,
        createTime: '2025-08-10 10:33:00',
        updateTime: '2025-09-26 08:10:00',
        heartbeat: '2025-09-25 22:00:00',
        clusterName: null,
        parentMid: 'cluster-ai-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
      {
        id: '1950832507307249726',
        name: 'AI训练节点5',
        ip: '192.168.300.15',
        port: 55050,
        mid: 'node-ai-005',
        starType: 'midStar',
        remarks: 'AI模型训练工作节点5',
        status: 1,
        createTime: '2025-08-10 10:34:00',
        updateTime: '2025-09-26 08:10:00',
        heartbeat: '2025-09-26 08:22:33',
        clusterName: null,
        parentMid: 'cluster-ai-001',
        nodeType: '1',
        clusterIp: null,
        clusterPort: null,
        clusterStatus: null,
        clusterCreateType: '0',
        clusterCount: '0',
      },
    ],
  };

  @Post('/query/page')
  postAgentList(@Body() body: any) {
/*     let { current, pageSize } = body;
    if (!current || !pageSize) {
      current = 1;
      pageSize = 6;
    }
    const start = (current - 1) * pageSize;
    const end = start + pageSize;
    const list = this.agentlist.list.slice(start, end); */
    return ResponseUtil.success({
      total: this.agentlist.total,
      list:this.agentlist.list,
    });
  }

  /* 集群分页查询 */
  public clusterList: any = [
    // 原有集群数据
    {
      id: '1950832507307249666',
      name: 'TestName',
      ip: '192.168.5.70',
      port: 56495,
      mid: 'node002',
      starType: 'lowStar',
      remarks: null,
      status: 0,
      createTime: '2025-07-31 16:14:49',
      updateTime: '2025-09-26 03:09:49',
      heartbeat: '2025-09-10 14:46:09',
      clusterName: 'karmada集群',
      parentMid: null,
      nodeType: '0',
      clusterIp: '192.168.5.70',
      clusterPort: 99,
      clusterStatus: '1',
      clusterCreateType: '0',
      clusterCount: '1',
      statisticsDataDTO: {
        totalCpuAllocatable: '32',
        totalMemoryAllocatable: '128Gi',
        totalDiskAllocatable: '500Gi',
        totalPodsAllocatable: '110',
        totalCpuUsage: '12',
        totalMemoryUsage: '45Gi',
        totalDiskUsage: '180Gi',
        totalPodsUsage: '35',
        totalCpuUsagePercent: '37.5%',
        totalMemoryUsagePercent: '35.2%',
        totalDiskUsagePercent: '36.0%',
        totalPodsUsagePercent: '31.8%',
        deployCount: 8,
        sonCount: 1,
        createType: 0,
      },
    },
    // 新增集群数据
    {
      id: '1950832507307249667',
      name: '生产集群主节点',
      ip: '10.0.1.10',
      port: 8080,
      mid: 'cluster-prod-001',
      starType: 'midStar',
      remarks: '生产环境主集群',
      status: 1,
      createTime: '2025-08-01 10:00:00',
      updateTime: '2025-09-26 08:00:00',
      heartbeat: '2025-09-26 08:15:00',
      clusterName: '生产集群',
      parentMid: null,
      nodeType: '0',
      clusterIp: '10.0.1.10',
      clusterPort: 8080,
      clusterStatus: '1',
      clusterCreateType: '0',
      clusterCount: '5',
      statisticsDataDTO: {
        totalCpuAllocatable: '80',
        totalMemoryAllocatable: '320Gi',
        totalDiskAllocatable: '1Ti',
        totalPodsAllocatable: '550',
        totalCpuUsage: '65',
        totalMemoryUsage: '256Gi',
        totalDiskUsage: '750Gi',
        totalPodsUsage: '420',
        totalCpuUsagePercent: '81.2%',
        totalMemoryUsagePercent: '80.0%',
        totalDiskUsagePercent: '73.2%',
        totalPodsUsagePercent: '76.4%',
        deployCount: 45,
        sonCount: 5,
        createType: 0,
      },
    },
    {
      id: '1950832507307249668',
      name: '测试集群主节点',
      ip: '10.0.2.10',
      port: 8081,
      mid: 'cluster-test-001',
      starType: 'midStar',
      remarks: '测试环境主集群',
      status: 1,
      createTime: '2025-08-02 10:00:00',
      updateTime: '2025-09-26 08:00:00',
      heartbeat: '2025-09-26 08:16:00',
      clusterName: '测试集群',
      parentMid: null,
      nodeType: '0',
      clusterIp: '10.0.2.10',
      clusterPort: 8081,
      clusterStatus: '1',
      clusterCreateType: '0',
      clusterCount: '5',
      statisticsDataDTO: {
        totalCpuAllocatable: '64',
        totalMemoryAllocatable: '256Gi',
        totalDiskAllocatable: '800Gi',
        totalPodsAllocatable: '440',
        totalCpuUsage: '32',
        totalMemoryUsage: '128Gi',
        totalDiskUsage: '400Gi',
        totalPodsUsage: '180',
        totalCpuUsagePercent: '50.0%',
        totalMemoryUsagePercent: '50.0%',
        totalDiskUsagePercent: '50.0%',
        totalPodsUsagePercent: '40.9%',
        deployCount: 25,
        sonCount: 5,
        createType: 0,
      },
    },
    {
      id: '1950832507307249669',
      name: '开发集群主节点',
      ip: '10.0.3.10',
      port: 8082,
      mid: 'cluster-dev-001',
      starType: 'lowStar',
      remarks: '开发环境主集群',
      status: 1,
      createTime: '2025-08-03 10:00:00',
      updateTime: '2025-09-26 08:00:00',
      heartbeat: '2025-09-26 08:17:00',
      clusterName: '开发集群',
      parentMid: null,
      nodeType: '0',
      clusterIp: '10.0.3.10',
      clusterPort: 8082,
      clusterStatus: '1',
      clusterCreateType: '0',
      clusterCount: '5',
      statisticsDataDTO: {
        totalCpuAllocatable: '48',
        totalMemoryAllocatable: '192Gi',
        totalDiskAllocatable: '600Gi',
        totalPodsAllocatable: '330',
        totalCpuUsage: '18',
        totalMemoryUsage: '72Gi',
        totalDiskUsage: '240Gi',
        totalPodsUsage: '95',
        totalCpuUsagePercent: '37.5%',
        totalMemoryUsagePercent: '37.5%',
        totalDiskUsagePercent: '40.0%',
        totalPodsUsagePercent: '28.8%',
        deployCount: 15,
        sonCount: 5,
        createType: 0,
      },
    },
    {
      id: '1950832507307249670',
      name: '预发布集群主节点',
      ip: '10.0.4.10',
      port: 8083,
      mid: 'cluster-pre-001',
      starType: 'midStar',
      remarks: '预发布环境主集群',
      status: 0,
      createTime: '2025-08-04 10:00:00',
      updateTime: '2025-09-26 08:00:00',
      heartbeat: '2025-09-24 15:30:00',
      clusterName: '预发布集群',
      parentMid: null,
      nodeType: '0',
      clusterIp: '10.0.4.10',
      clusterPort: 8083,
      clusterStatus: '0',
      clusterCreateType: '0',
      clusterCount: '5',
      statisticsDataDTO: {
        totalCpuAllocatable: '40',
        totalMemoryAllocatable: '160Gi',
        totalDiskAllocatable: '500Gi',
        totalPodsAllocatable: '275',
        totalCpuUsage: '8',
        totalMemoryUsage: '32Gi',
        totalDiskUsage: '100Gi',
        totalPodsUsage: '45',
        totalCpuUsagePercent: '20.0%',
        totalMemoryUsagePercent: '20.0%',
        totalDiskUsagePercent: '20.0%',
        totalPodsUsagePercent: '16.4%',
        deployCount: 8,
        sonCount: 5,
        createType: 0,
      },
    },
    {
      id: '1950832507307249671',
      name: '华东区集群主节点',
      ip: '172.16.1.10',
      port: 8084,
      mid: 'cluster-east-001',
      starType: 'midStar',
      remarks: '华东区域主集群',
      status: 1,
      createTime: '2025-08-05 10:00:00',
      updateTime: '2025-09-26 08:00:00',
      heartbeat: '2025-09-26 08:18:00',
      clusterName: '华东区集群',
      parentMid: null,
      nodeType: '0',
      clusterIp: '172.16.1.10',
      clusterPort: 8084,
      clusterStatus: '1',
      clusterCreateType: '0',
      clusterCount: '5',
      statisticsDataDTO: {
        totalCpuAllocatable: '96',
        totalMemoryAllocatable: '384Gi',
        totalDiskAllocatable: '1.2Ti',
        totalPodsAllocatable: '660',
        totalCpuUsage: '72',
        totalMemoryUsage: '288Gi',
        totalDiskUsage: '900Gi',
        totalPodsUsage: '480',
        totalCpuUsagePercent: '75.0%',
        totalMemoryUsagePercent: '75.0%',
        totalDiskUsagePercent: '73.2%',
        totalPodsUsagePercent: '72.7%',
        deployCount: 55,
        sonCount: 5,
        createType: 0,
      },
    },
    {
      id: '1950832507307249672',
      name: '华南区集群主节点',
      ip: '172.16.2.10',
      port: 8085,
      mid: 'cluster-south-001',
      starType: 'lowStar',
      remarks: '华南区域主集群',
      status: 1,
      createTime: '2025-08-06 10:00:00',
      updateTime: '2025-09-26 08:00:00',
      heartbeat: '2025-09-26 08:19:00',
      clusterName: '华南区集群',
      parentMid: null,
      nodeType: '0',
      clusterIp: '172.16.2.10',
      clusterPort: 8085,
      clusterStatus: '1',
      clusterCreateType: '0',
      clusterCount: '5',
      statisticsDataDTO: {
        totalCpuAllocatable: '72',
        totalMemoryAllocatable: '288Gi',
        totalDiskAllocatable: '900Gi',
        totalPodsAllocatable: '495',
        totalCpuUsage: '54',
        totalMemoryUsage: '216Gi',
        totalDiskUsage: '675Gi',
        totalPodsUsage: '320',
        totalCpuUsagePercent: '75.0%',
        totalMemoryUsagePercent: '75.0%',
        totalDiskUsagePercent: '75.0%',
        totalPodsUsagePercent: '64.6%',
        deployCount: 42,
        sonCount: 5,
        createType: 0,
      },
    },
    {
      id: '1950832507307249673',
      name: '华北区集群主节点',
      ip: '172.16.3.10',
      port: 8086,
      mid: 'cluster-north-001',
      starType: 'midStar',
      remarks: '华北区域主集群',
      status: 0,
      createTime: '2025-08-07 10:00:00',
      updateTime: '2025-09-26 08:00:00',
      heartbeat: '2025-09-25 10:30:00',
      clusterName: '华北区集群',
      parentMid: null,
      nodeType: '0',
      clusterIp: '172.16.3.10',
      clusterPort: 8086,
      clusterStatus: '0',
      clusterCreateType: '0',
      clusterCount: '5',
      statisticsDataDTO: {
        totalCpuAllocatable: '64',
        totalMemoryAllocatable: '256Gi',
        totalDiskAllocatable: '800Gi',
        totalPodsAllocatable: '440',
        totalCpuUsage: '12',
        totalMemoryUsage: '48Gi',
        totalDiskUsage: '160Gi',
        totalPodsUsage: '85',
        totalCpuUsagePercent: '18.8%',
        totalMemoryUsagePercent: '18.8%',
        totalDiskUsagePercent: '20.0%',
        totalPodsUsagePercent: '19.3%',
        deployCount: 12,
        sonCount: 5,
        createType: 0,
      },
    },
    {
      id: '1950832507307249674',
      name: '边缘计算集群主节点',
      ip: '192.168.100.10',
      port: 8087,
      mid: 'cluster-edge-001',
      starType: 'lowStar',
      remarks: '边缘计算主集群',
      status: 1,
      createTime: '2025-08-08 10:00:00',
      updateTime: '2025-09-26 08:00:00',
      heartbeat: '2025-09-26 08:20:00',
      clusterName: '边缘计算集群',
      parentMid: null,
      nodeType: '0',
      clusterIp: '192.168.100.10',
      clusterPort: 8087,
      clusterStatus: '1',
      clusterCreateType: '0',
      clusterCount: '5',
      statisticsDataDTO: {
        totalCpuAllocatable: '32',
        totalMemoryAllocatable: '128Gi',
        totalDiskAllocatable: '400Gi',
        totalPodsAllocatable: '220',
        totalCpuUsage: '24',
        totalMemoryUsage: '96Gi',
        totalDiskUsage: '300Gi',
        totalPodsUsage: '165',
        totalCpuUsagePercent: '75.0%',
        totalMemoryUsagePercent: '75.0%',
        totalDiskUsagePercent: '75.0%',
        totalPodsUsagePercent: '75.0%',
        deployCount: 28,
        sonCount: 5,
        createType: 0,
      },
    },
    {
      id: '1950832507307249675',
      name: '容灾备份集群主节点',
      ip: '192.168.200.10',
      port: 8088,
      mid: 'cluster-backup-001',
      starType: 'midStar',
      remarks: '容灾备份主集群',
      status: 1,
      createTime: '2025-08-09 10:00:00',
      updateTime: '2025-09-26 08:00:00',
      heartbeat: '2025-09-26 08:21:00',
      clusterName: '容灾备份集群',
      parentMid: null,
      nodeType: '0',
      clusterIp: '192.168.200.10',
      clusterPort: 8088,
      clusterStatus: '1',
      clusterCreateType: '0',
      clusterCount: '5',
      statisticsDataDTO: {
        totalCpuAllocatable: '88',
        totalMemoryAllocatable: '352Gi',
        totalDiskAllocatable: '2Ti',
        totalPodsAllocatable: '605',
        totalCpuUsage: '35',
        totalMemoryUsage: '140Gi',
        totalDiskUsage: '1Ti',
        totalPodsUsage: '220',
        totalCpuUsagePercent: '39.8%',
        totalMemoryUsagePercent: '39.8%',
        totalDiskUsagePercent: '48.8%',
        totalPodsUsagePercent: '36.4%',
        deployCount: 32,
        sonCount: 5,
        createType: 0,
      },
    },
    {
      id: '1950832507307249676',
      name: 'AI训练集群主节点',
      ip: '192.168.300.10',
      port: 8089,
      mid: 'cluster-ai-001',
      starType: 'midStar',
      remarks: 'AI模型训练主集群',
      status: 1,
      createTime: '2025-08-10 10:00:00',
      updateTime: '2025-09-26 08:00:00',
      heartbeat: '2025-09-26 08:22:00',
      clusterName: 'AI训练集群',
      parentMid: null,
      nodeType: '0',
      clusterIp: '192.168.300.10',
      clusterPort: 8089,
      clusterStatus: '1',
      clusterCreateType: '0',
      clusterCount: '5',
      statisticsDataDTO: {
        totalCpuAllocatable: '160',
        totalMemoryAllocatable: '640Gi',
        totalDiskAllocatable: '2.5Ti',
        totalPodsAllocatable: '1100',
        totalCpuUsage: '128',
        totalMemoryUsage: '512Gi',
        totalDiskUsage: '2Ti',
        totalPodsUsage: '850',
        totalCpuUsagePercent: '80.0%',
        totalMemoryUsagePercent: '80.0%',
        totalDiskUsagePercent: '78.0%',
        totalPodsUsagePercent: '77.3%',
        deployCount: 78,
        sonCount: 5,
        createType: 0,
      },
    },
  ];

  @Post('/query/cluster/page')
  postClusterList(@Body() body: any) {
    let { current, pageSize } = body;
    if (!current || !pageSize) {
      current = 1;
      pageSize = 6;
    }
    const start = (current - 1) * pageSize;
    const end = start + pageSize;
    const list = this.clusterList.slice(start, end);
    return ResponseUtil.success({
      pages: current,
      total: this.clusterList.length,
      list: list,
    });
  }
}
